package com.huangliusong.web.controller;

import com.huangliusong.web.domain.User;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author huangliusong
 * @since 2018/10/4
 * {@link }
 */
@RestController
public class UserRestController {

    //根据标注的produces来设置传输 415错误是媒体不支持
    @PostMapping(value = "/echo/user",produces = {"application/*;charset=UTF-8","application/json;charset=UTF-8"})
    public User user(@RequestBody User user){
        return  user;
    }
}
